<?php	
	require_once('config.php');
	require_once('db.php');
	$link = connectdb($servername,$dbname,$dbusername,$dbpassword);
	$id=$_GET['id'];
	$sql="SELECT * FROM protocols WHERE id='$id'";
	$result=mysql_query($sql);
	$rows=mysql_fetch_array($result);
?>
<div align="center"><h1>Protocol Information</h1></div>
<form name="Update" method="post" action="updateprot_ac.php">
<table width="40%" style="margin-left: 30%" border="1" cellspacing="1" cellpadding="0">
	<tr>
		<td>
			<table width="400" border="0" cellspacing="0" cellpadding="3">
				<tr>
					<td align="center">&nbsp;</td>
					<td align="center"><strong>Name</strong></td>
					<td align="center"><strong>Port</strong></td>	
				</tr>
				<tr>
					<td><input name="id" type="hidden" id="id"  checked="checked" value="<?php echo $rows['id']; ?>"></td>
					<td align="center"><input name="Name" type="text" id="Name" value="<?php echo $rows['name']; ?>"></td>
					<td align="center"><input name="Port" type="text" id="Port" value="<?php echo $rows['port']; ?>" size="15"></td>
				</tr>
				<tr>				
					<td align="center" colspan="3"><input type="submit" name="Submit" value="Submit"></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</form>
<div align="center"><?php if(isset($_GET['message'])) echo $_GET['message'];?></div><br />
<div align="center"><a href="protocols.php">Back to Protocol Management</a></div>
<div align="center"><a href="index.php">Back to Main Menu</a></div>
<?
// close connection
	close($link);
?>
